//
//  XOShoppingCartShopHeaderView.m
//  EnjoyShoppingStreet
//
//  Created by lifayu on 2018/3/16.
//  Copyright © 2018年 lifayu. All rights reserved.
//

#import "XOShoppingCartShopHeaderView.h"

#import "XOShoppingCartModel.h"

@implementation XOShoppingCartShopHeaderView

- (void)setShoppingCartModel:(XOShoppingCartModel *)shoppingCartModel{
    _shoppingCartModel = shoppingCartModel;
    [_shopLogoImageView setImageWithUrl:_shoppingCartModel.logo];
    _shopNameLabel.text = _shoppingCartModel.shopName;
    _selectedButton.selected = _shoppingCartModel.wholeSelected;
}

- (IBAction)selectAction:(UIButton *)sender {
    if(_delegate && [_delegate respondsToSelector:@selector(headerView:select:model:)]){
        [_delegate headerView:self select:!_selectedButton.selected model:_shoppingCartModel];
    }
}


@end
